<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="../assets/js/vue.js"></script>
    <link rel="stylesheet" href="../assets/css/index.css"/>
</head>
<body>
<h1>Vue-extend</h1>
<hr>
<div id="header"></div>
<div id="footer"></div>

<script>
    var header = Vue.extend({
        template: '<p>{{message}}</p>',
        data: function () {
            return {
                message: 'hello my is header'
            }
        }
    })
    var footer = Vue.extend({
        template: '<p>{{message}}</p>',
        data: function () {
            return {
                message: 'hello my is footer'
            }
        }
    })
    //挂载和组件不一样，挂载不能给属性，只能挂载无属性的标签实体
    new header().$mount('#header');//挂载
    new footer().$mount('#footer');//必须加#，视频不对
</script>
</body>
</html>